Java Native Screen Element Functionality
Java Native screen elements have their own properties, functions, and events.
The JN Generic screen element type is the basic type, meaning all other Java Native screen element types inherit properties, functions, and events from this property, and may have their own additional functionality. For a full list of the Java Native screen element functionality, see Java Native Screen Element Properties, Functions, and Events.
To view the functionality for a specific screen element, select it in the Screen Elements tree and navigate to the Functionality tab, as described in Viewing the Functionality of a Java Native Screen Element in the Functionality Tab, or locate it in the ScreenPluginJavaNative library in the Real-Time Designer Project tab, as described in Viewing the Functionality of a Java Native Screen Element in the Library.
Viewing the Functionality of a Java Native Screen Element in the Functionality Tab
When you select a Java Native screen element in the Screen Elements tree, you can view its functionality in the Functionality tab.
To view the functionality of a Java Native screen element in the Functionality tab:
-
Select the captured Java Native screen element in the Screen Elements tree.
-
Click the Functionality tab.
The Functionality tab shows the properties, functions, and events available for the selected screen element. For more information, see Using the Functionality Tab For detailed descriptions of the available functions, see Java Native Screen Element Functions.
Viewing the Functionality of a Java Native Screen Element in the Library
You can view the functionality of a Java Native screen element without capturing it by selecting the corresponding library in the Real-Time Designer.
To view the functionality of Java Native screen elements in the library:
-
Select the Project tab.
-
Under References, expand the Library References node.
-
Select the ScreenPluginJavaNative library in the tree.
The Assembly Info tab appears with information about the library.
-
Select the Functionality tab, then select a Java Native screen element type from the Type drop-down list.
The element properties, functions, and events appear. For detailed descriptions of the available functionality, see Java Native Screen Element Properties, Functions, and Events.
The Process screen element type is not listed in the ScreenPluginJavaNative module. This screen element type is defined in the Connectivity.Shared.dll assembly.
Java Native Screen Element Properties, Functions, and Events
Java Native Screen Element Properties
The following properties are supported for all Java Native screen element types:
Property |
Description |
---|---|
Bounding Rectangle | The rectangle outlines the area where the cursor is currently hovering, which is captured as the screen element. |
Enabled | Indicates whether a screen element is enabled. |
Exists | Indicates whether a screen element exists. |
Focused | Indicates whether a screen element is in focus. |
Item Count | The number of items on a screen element. For example: Context Menu |
Items | The list of items on a screen element (List of Text) For example: Context Menu |
Name | The name of the screen element. |
Process ID | The unique process ID. |
Text | The value of this property very much depends on the type of the object. This is straightforward for text fields or menu items, on the other hand this property is empty for toolbar buttons and is the class id for shells. You can read the text property of a label, but you can't change it, whereas you can only set the text property of a password field, but not read it. |
Visible | Indicates whether a screen element is visible. |
Window Handle | The window handle of the screen element. |
Java Native Screen Element Functions
The following functions are supported for all Java Native screen element types:
Function |
Description |
---|---|
Activate And Lock Instance | Locks the screen element and makes it the active element. The screen element itself and all its parent screen elements in the hierarchy are locked. |
Bring to Front | Moves the screen element to the top of the stacking order, thereby bringing it to the front. |
Click | Clicks on the screen element. You can specify to execute this function asynchronously, so that it does not block continuous connectivity and recognition. |
Destroy and Refresh | Validates the objects beginning from the level of the screen element in the hierarchy. The process destroys any object that no longer exists, and attempts to recognize new objects and all their child objects down the hierarchy. |
Double Click | Double-clicks on the screen element. You can specify to execute this function asynchronously, so that it does not block continuous connectivity and recognition. |
Emulate Keyboard | Emulates entering text from the keyboard. You can specify to execute this function asynchronously, so that it does not block continuous connectivity and recognition. |
Emulate Mouse Click | Emulates a left mouse click on the screen element. |
Emulate Mouse Double Click | Emulates a double mouse click on the screen element. |
Emulate Mouse Right Click | Emulates a right mouse click on the screen element. |
Execute Java Script | Executes a JavaScript script on the screen element. |
Execute Native Script | Executes a NativeScript script on the screen element. |
Get Instance By Parent | Returns the first recognized physical object of a screen element whose enumerator (parent) has the given Window Handle value. |
Get Instances | Returns all recognized physical object instances of a screen element. |
Locate | Locates the screen element in the Java application and frames it with a blinking red border. |
Recognize Children | Recognizes the children of the screen element. |
Refresh | Validates the objects beginning from the top level in the hierarchy. The process destroys any object that no longer exists, and attempts to recognize new objects and their child objects down the hierarchy. |
Right Click | Right-clicks the screen element. You can specify to execute this function asynchronously, so that it does not block continuous connectivity and recognition. |
Send Keys | Executes a keyboard emulation script on the screen element. |
Set Focus | Gives focus to the screen element. |
Unlock Active Instance | Unlocks the active instance that has been locked by the Activate And Lock Instance function. |
Validate Children | Validates the children of the screen element. |
Java Native Screen Element Events
The following events are supported for all Java Native screen element types:
Event |
Description |
---|---|
Action Performed | Fired when an action is performed. |
Clicked | Fired when the screen element is clicked. |
Created | Fired when the screen element is created. |
Destroyed | Fired when the screen element is destroyed. |
Double Clicked | Fired when the screen element is double-clicked. |
Gained Focus | Fired when the screen element gains focus. |
Lost Focus | Fired when the screen element loses focus. |
Mouse Enter | Fired when the mouse enters the screen element. |
Mouse Leave | Fired when the mouse leaves the screen element. |
JN Button Screen Element
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional functions are available for Java Native Button screen elements.
Function |
Description |
---|---|
Do Action | Executes the action defined for the button. |
Do Performed Action | Executes the performed action defined for the button. |
JN Check Box screen element
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional property is available for Java Native Check Box screen elements.
Property |
Description |
---|---|
Checked | Indicates the checked state of the check box. |
JN Combo Box Screen Element
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional properties are available for Java Native Combo Box screen elements.
Property |
Description |
---|---|
Item Count | Counts the Items from a combo box . |
Items | Returns a list of items. |
Selected Index | Gets or sets the selected Index of a combo box. |
Selected Item | Gets or sets the selected Item of a combo box. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional function is available for Java Native Combo Box screen elements.
Function |
Description |
---|---|
Get Item Text | Gets the text of the item in the combo box specified by the index path. |
JN Context Menu
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional properties are available for Java Context Menu screen elements.
Property |
Description |
---|---|
Item Count | The number of items in the Context Menu. |
Items | A list of the items in the Context Menu. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional functions are available for Java Native Context Menu screen elements.
Function |
Description |
---|---|
Click Item By Index | Clicks the context menu item specified by index. |
Click Item By Text | Clicks the context menu item specified by text. |
Emulate Input | Emulates keyboard input {Up, Down, Left, Right, Enter, Esc}. |
Get Item Text By Index | Returns text of the context menu item by index. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional event is available for Java Context Menu screen elements.
Event |
Description |
---|---|
Changed | Fired when the context menu is changed. |
JN expand bar screen element
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional properties are available for Java Native Expand Bar screen elements.
Property |
Description |
---|---|
Items | A list of the items in the Expand Bar. |
Items Count | The number of items in the Expand Bar. |
JN Frame Screen Element
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional event is available for Java Native Frame screen elements.
Events |
Description |
---|---|
Changed | Fired when the frame is changed. |
JN Internal Frame Screen Element
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional property is available for Java Native Internal Frame screen elements.
Property |
Description |
---|---|
Title |
The title of the internal frame. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional event is available for Java Native Internal Frame screen elements.
Events |
Description |
---|---|
Changed | Fired when the internal frame is changed. |
JN List Box Screen Element
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional properties are available for Java Native List Box screen elements.
Property |
Description |
---|---|
Item Count | The number of items in the List Box. |
Items | A list of the items in the List Box. |
Multi Select | Indicates if multiple items can be selected from the List Box. |
Selected Index | The index number of the item selected from the List Box. |
Selected Indexes | A list of the index numbers of the items selected from the List Box. |
Selected Item | The name of the item selected from the List Box. |
Selected Items | A list of the names of the items selected from the List Box. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional event is available for Java Native List Box screen elements.
Event |
Description |
---|---|
Changed | Fired when the List Box is changed. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional functions are available for Java Native List Box screen elements.
Function |
Description |
---|---|
Click On Item | Clicks on the item in the list specified by the index path. |
Double Click On Item | Double-clicks on the item in the list specified by the index path. |
Ensure Item Visible | Ensures that the item in the list specified by the index path is visible. |
Get Item Text | Gets the text of the item in the list specified by the index path. |
Is Item Visible | Checks if the node in tree specified by the index path is visible. |
Right Click on Item | Right-clicks on the item in the list specified by the index path. |
JN List View Screen Element
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional properties are available for Java Native List View screen elements.
Property |
Description |
---|---|
Selected Row | The text of the row selected in the List View. |
Selected Row Index | The index number of the row selected in the List View. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional event is available for Java Native List View screen elements.
Event |
Description |
---|---|
Changed | Fired when the List View is changed. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional functions are available for Java Native List View screen elements.
Function |
Description |
---|---|
Click On Cell | Clicks on the cell in the List View specified by the column number and row number. |
Click On Row | Clicks on the row in the List View specified by the row number. |
Double Click On Row | Double-clicks on the row in the List View specified by the row number. |
Ensure Row Visible | Ensures that the row in the List View specified by the row number is visible. |
Get Cell Rectangle | Gets the screen element rectangle of the cell at the specified column and row. |
Get Cell Text | Gets the text value in the cell at the specified column and row. |
Get Column Name | Gets the name of the column specified by the column number. |
Get Row Rectangle | Get the screen element rectangle in the List View specified by the row number. |
Is Row Visible | Checks if the row in the List View specified by the row number is visible. |
JN Menu Item Screen Element
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional properties are available for Java Native Menu Item screen elements.
Property |
Description |
---|---|
Checked | Indicates the checked state of the Menu Item. |
Item Count | The number of items in the Menu Item. |
Items | A list of the items in the Menu Item. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional event is available for Java Native Menu Item screen elements.
Event |
Description |
---|---|
Changed | Fired when the Menu Item is changed. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional functions are available for Java Native Menu Item screen elements.
Function |
Description |
---|---|
Click Item | Clicks the Menu Item specified by the path. You can specify to execute this function asynchronously, so that it does not block continuous connectivity and recognition. |
Get Item Checked | Gets the checked state of the Menu Item specified by the index path. |
Get Item Enabled | Gets the enabled state of the Menu Item specified by the index path. |
Get Item Text | Gets the text value of the Menu Item specified by the index path. |
Set Item Checked | Sets the checked state of the Menu Item specified by the index path. |
Set Item Enabled | Sets the enabled state of the Menu Item specified by the index path. |
Set Item Text | Sets the text value of the menu item specified by the index path. |
JN Radio button Screen Element
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional property is available for Java Native Radio Button screen elements.
Property |
Description |
---|---|
Checked | Indicates the checked state of the Radio Button. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional function is available for Java Native Radio Button screen elements.
Function |
Description |
---|---|
Do Action | Executes the action defined for the radio button. |
Jn scroll pane screen element
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional properties are available for Java Native Scroll Pane screen elements.
Property |
Description |
---|---|
Current HScroll | Indicates the current percentage value of a horizontal scroll bar. |
Current VScroll | Indicates the current percentage value of a vertical scroll bar. |
JN Tab Bar Screen Element
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional properties are available for Java Native Tab Bar screen elements.
Property |
Description |
---|---|
Selected Tab | The name of the tab selected in the Tab Bar. |
Selected Tab Index | The index number of the tab selected in the Tab Bar. |
Tab Count | The number of tabs in the Tab Bar. |
Tabs | A list of the tab in the Tab Bar. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional functions are available for Java Native Tab Bar screen elements.
Function |
Description |
---|---|
Click Tab | Clicks on the tab specified by the index number. |
Close Selected Tab | Closes the currently selected tab. |
JN Table Screen Element
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional properties are available for Java Native Table screen elements.
Property |
Description |
---|---|
Allowed Column Selection | Indicates whether a column selection is allowed. |
Allowed Row Selection | Indicates whether a row selection is allowed. |
Columns Count |
The number of columns |
Rows Count | The number of rows. |
Selected Column Index | The index number of the column selected in the Table. |
Selected Row Index | The index number of the row selected in the Table. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional event is available for Java Native Table screen elements.
Event |
Description |
---|---|
Changed | Fired when the Table is changed. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional functions are available for Java Native Table screen elements.
Function |
Description |
---|---|
Click Cell | Clicks on the cell at the specified column and row. You can specify to execute this function asynchronously, so that it does not block continuous connectivity and recognition. This function includes three parameters. |
Double Click Cell | Double-clicks on the cell at the specified column and row. You can specify to execute this function asynchronously, so that it does not block continuous connectivity and recognition. This function includes three parameters. |
Get Cell Rectangle | Get the screen element rectangle of the cell at the specified column and row. This function includes two parameters. |
Get Cell Text | Gets the text value in the cell at the specified column and row. This function includes two parameters. |
Highlight All Cells | Highlights all the cells in the table. |
Is Cell Selected | Checks if the cell at the specified column and row is selected. This function includes two parameters. |
Right Click Cell | Right-clicks on the cell at the specified column and row. You can specify to execute this function asynchronously, so that it does not block continuous connectivity and recognition. This function includes three parameters. |
Set Cell Text | Sets a text value in the cell at the specified column and row. This function includes three parameters. |
JN Toggle button Screen Element
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional property is available for Java Native Toggle Button screen elements.
Property |
Description |
---|---|
Checked | Indicates the checked state of the Toggle Button. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional function is available for Java Native Toggle Button screen elements.
Function |
Description |
---|---|
Do Action | Executes the action defined for the Toggle Button. |
JN Tree Screen Element
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional properties are available for Java Native Tree screen elements.
Property |
Description |
---|---|
Root Items | A list of root items for the Tree. |
Selected Item Path | The path to the item selected in the Tree. |
Selected Item Text | The text of the items selected in the Tree. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional event is available for Java Native Tree screen elements.
Event |
Description |
---|---|
Changed | Fired when the Tree is changed. |
In addition to the general functionality that is common to all Java Native screen elements, as described in Java Native Screen Element Properties, Functions, and Events, the following additional functions are available for Java Native Tree screen elements.
Function |
Description |
---|---|
Click On Item | Clicks on the item in the Tree specified by the index path. |
Click On Node | Clicks on the node in the Tree specified by the index path. |
Collapse | Collapses the Tree to the node specified by the index path. |
Double Click On Item | Double-clicks on item. You can specify to execute this function asynchronously, so that it does not block continuous connectivity and recognition. |
Ensure Visible |
Ensures that the node specified by the index path is visible. LIMITATION: From time to time, upon a successful function call, the function may fail to return a successful result. To clarify this, you can check the returned value in your Java application. |
Expand | Expands the Tree so that the node specified by the index path is visible. |
Find All Children Paths | Finds the paths of all the children of the node specified by the index path or the item name. |
Find First Child Path | Finds the path to the first child of the node specified by the index path or the item name. |
Find First Item Path | Finds the path to the first item of the node specified by the index path or the item name. |
Get Children | Get all the children of the node in the Tree specified by the index path. |
Get Item Rectangle | Get the screen element rectangle of the item at the index path. |
Get Item Text | Gets the text of the node in the Tree specified by the index path. |
Is Item Visible | Checks if the node in Tree specified by the index path is visible. |
Names By Path | Get the names of all the nodes in a specified index path. |
Path By Names | Get the index path to the specified nodes. |
Right Click on Item | Right-clicks on the node in the Tree specified by the index path. |
Select Item | Selects the node in the Tree specified by the index path. |